home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
File
/
c
/
printf
< prev
next >
Wrap
Text File
|
1995-07-08
|
1KB
|
36 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: File.printf.c
Author: Copyright © 1994 Jason Howat
Version: 1.00 (28 May 1994)
Purpose: Do a "printf" to a File.
*/
#include <stdarg.h>
#include <stdio.h>
#include "DeskLib:File.h"
extern int File_printf(file_handle file, char *format, ...)
{
va_list argp;
char buff[512];
int byteswritten;
va_start(argp,format);
byteswritten = vsprintf(buff, format, argp);
if(byteswritten > 0)
File_WriteBytes(file, buff, byteswritten);
va_end(argp);
return byteswritten;
}